﻿using Sgr.Domain.Entities;
using Sgr.Serialization;
using Sgr.UPMS.Application.Services;
using Sgr.UPMS.Domain.Users;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Sgr.UPMS.Application.ViewModels
{
    /// <summary>
    /// 用户个人中心输出视图模型
    /// </summary>
    public class OutPersonalViewModel
    {
        /// <summary>
        /// 用户Id
        /// </summary>
        public long Id { get; set; }

        /// <summary>
        /// 登录名称
        /// </summary>
        public string LoginName { get; set; } = string.Empty;

        /// <summary>
        /// 用户姓名
        /// </summary>
        public string? UserName { get; set; }

        /// <summary>
        /// 用户头像URL
        /// </summary>
        public string? AvatarUrl { get; set; }

        /// <summary>
        /// 用户绑定的手机号码
        /// </summary>
        public string? UserPhone { get; set; }

        /// <summary>
        /// 用户绑定的邮箱地址
        /// </summary>
        public string? UserEmail { get; set; }

        /// <summary>
        /// 最近一次登录时间
        /// </summary>
        public DateTime? LastLoginTime { get; set; }

        /// <summary>
        /// 用户QQ号码
        /// </summary>
        public string? QQ { get; set; }

        /// <summary>
        /// 性别
        /// </summary>
        public Gender Gender { get; set; } = Gender.Unknown;

        /// <summary>
        /// 是否超级管理员
        /// </summary>
        public bool IsSuperAdmin { get; set; }

        /// <summary>
        /// 账号状态
        /// </summary>
        public EntityStates State { get; set; }

        /// <summary>
        /// 所属组织Id
        /// </summary>
        public long OrgId { get; set; }

        /// <summary>
        /// 所属部门名称
        /// </summary>
        public string DepartmentName { get; set; } = string.Empty;

        /// <summary>
        /// 首要的岗位名称
        /// </summary>
        public string PrimaryDutyName { get; set; } = "";

        /// <summary>
        /// 所属用户组名称，多个用逗号隔开
        /// </summary>
        public string RolesName { get; set; } = "";

        /// <summary>
        /// 出生日期
        /// </summary>
        public DateOnly? BirthDay { get; set; }
    }
}